import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Login',
    component: () => import('../views/login/Login.vue'),
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('../views/home/Home.vue'),
  },
  {
    path: '/layout',
    name: 'Layout',
    component: () => import('../views/layout/Layout.vue'),
  },
  {
    path: '/pms',
    component: () => import('../views/pms/App.vue'),
    children: [
      {
        path: 'addProduct',
        component: () => import('../views/pms/AddProduct.vue'),
      },
      {
        path: 'product',
        component: () => import('../views/pms/Product.vue'),
      },
      {
        path:'productCate',
        component:()=> import('../views/pms/ProductCate.vue')
      },
       {
        path:'productAttr',
        component:()=> import('../views/pms/ProductAttr.vue')
      }
    ],
  },
]

const router = new VueRouter({
  routes,
})

export default router
